package com.hyopt.modules.app.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hyopt.modules.app.entity.AlarmInfoEntity;
import com.hyopt.modules.app.form.*;

import java.util.List;
import java.util.Map;

/**
 * @author liubin
 * @date 2020/1/6 10:54
 */
public interface AlarmInfoService extends IService<AlarmInfoEntity> {
  boolean save(AlarmSaveForm form) throws Exception;

  /**
   * 当前报警
   * @param form
   * @return
   * @throws Exception
   */
  List<AlarmListInfoVo> getNowList(AlarmNowQueryForm form) throws Exception;

  /**
   * 已处理未处理报警
   * @param form
   * @return
   * @throws Exception
   */
  List<AlarmListInfoVo> getHandleList(AlarmHandledQueryForm form) throws Exception;

  /**
   * 已处理未处理报警,不分页
   * @param form
   * @return
   * @throws Exception
   */
  List<AlarmListInfoVo> getAllNumber(AlarmHandledQueryForm form) throws Exception;

  /**
   * 报警统计
   * @param form
   * @return
   * @throws Exception
   */
  List<AlarmListInfoVo> totalList(AlarmListQueryForm form) throws Exception;

  /**
   * 报警统计求总数
   * @param form
   * @return
   * @throws Exception
   */
  int getTotal(AlarmListQueryForm form) throws Exception;

  boolean listClear(AlarmClearForm form);

  /**
   * 详细报警信息
   * @param alarmId
   * @return
   */
  AlarmListInfoVo getDetail(Integer alarmId);


  Map<String,String> getUserTokenByAlarmId(String ids);

}
